package com.project.psc.config;

import com.project.psc.mg.MgWebsocket;
import com.project.psc.service.IMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@Configuration
public class WebSocketConfig {

    @Bean
    public ServerEndpointExporter getServerEndpointExporter(){
        return new ServerEndpointExporter();
    }


    @Autowired
    public void setTestService(IMessageService messageService){
        MgWebsocket.messageService=messageService;
    }
}
